package com.wing.enterprisecab.feign;

import com.wing.common.utils.JsonResult;
import com.wing.enterprisecab.cabinet.response.InventoryAlarmDetailVO;
import com.wing.enterprisecab.order.request.InventoryOutPlanForm;
import com.wing.enterprisecab.order.response.InventoryJobLabelVO;
import com.wing.enterprisecab.product.model.response.ProductDetailVO;
import com.wing.enterprisecab.warehouse.WarehouseForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@FeignClient(name = "${enterpriseCab.appName}",fallback = EnterpriseCabClientFallback.class)
public interface EnterpriseCabClient {
    /**
     * 查询cab库产品信息
     * @param skuCode
     * @return
     */
    @GetMapping("/productCab/admin/productDetail/getProductInfoBySkuCode")
    JsonResult<ProductDetailVO> getProductInfoBySkuCode(@RequestParam("skuCode") String skuCode);


    @GetMapping("/order/admin/inventoryJobLabel/getByLabelCodeLoadId")
    JsonResult<InventoryJobLabelVO> getByLabelCodeLoadId(@RequestParam("packLabelCode") String packLabelCode,@RequestParam("loadPlanId") Long loadPlanId);

    /**
     * 出入库计划添加
     * @param inventoryOutPlanForm
     * @return
     */
    @PostMapping("/order/admin/inventoryOutPlan/deliveryOutPlanAdd")
    JsonResult deliveryOutPlanAdd(InventoryOutPlanForm inventoryOutPlanForm);

    /**
     * 查询库存告警明细
     * @param alarmId
     * @return
     */
    @GetMapping("/cabinet/admin/cellInventoryAlarm/getInventoryAlarmDetailVoList")
    List<InventoryAlarmDetailVO> getInventoryAlarmDetailVoList(@RequestParam("alarmId") Long alarmId);

    /**
     * 创建工序仓库
     */
    @PostMapping("/warehouse/admin/warehouse/addByWarehouse")
    JsonResult warehouseAdd(@RequestBody WarehouseForm warehouseForm);

    @PutMapping("/warehouse/admin/moveDownWareHouse/updateMapById")
    JsonResult updateMoveDownWareHouseMapById(@RequestBody Map<String, Object> param);

    @PutMapping("/warehouse/admin/moveDownWarehouseIterm/updateByMap")
    JsonResult updateMoveDownWareHouseItemByMap(@RequestBody Map<String, Object> param);
}
